"""
image_processing1.py 将彩色图片转化成为灰度图片
"""
from PIL import Image
import os
path = 'C:\\Users\\86187\\Desktop\\2021 machine learning\\homework\\machinelearning_homework-master\\report_03_Fashion\\taobao\\shoes'
file_list = os.listdir(path)
for file in file_list:
    I = Image.open(path+"/"+file)
    L = I.convert('L')
    L.save(path+"/"+file)